package com.photoeditor.demo.model.bean;

import java.util.ArrayList;

public class ImageFolder
{
	/**
	 * 图片的文件夹路径(包含名称)
	 */
	private String mDir;

	/**
	 * 文件夹的名称
	 */
	private String mName;
	
	/**
	 * 文件夹的名称
	 */
	private String mBucketId;

	/**
	 * 图片的ThumbnailBean
	 */
	private ArrayList<ThumbnailBean> mDatas;
	
	/**
	 * 图片的数量
	 */
	private int mCount;
	
	/**
	 * 第一张图片的ThumbnailBean
	 */
	private ThumbnailBean mFirstThumbnailBean;
	
	private boolean mNeedRefresh;
	
	public ImageFolder(){
		mCount = 0;
	}
	
	public ImageFolder(int count){
		mCount = count;
	}
	
	public String getDir()
	{
		return mDir;
	}

	public void setDir(String dir)
	{
		this.mDir = dir;
	}
	
	public void setDirAndName(String dir)
	{
		this.mDir = dir;
		int lastIndexOf = this.mDir.lastIndexOf("/");
		this.mName = this.mDir.substring(lastIndexOf);
	}
	
	public void setName(String name)
	{
		this.mName = name;
	}

	public ThumbnailBean getFirstThumbnailBean()
	{
		return mFirstThumbnailBean;
	}

	public void setFirstImageBean(ThumbnailBean thumbnailBean)
	{
		this.mFirstThumbnailBean = thumbnailBean;
	}

	public String getName()
	{
		return mName;
	}
	public int getCount()
	{
		return mCount;
	}

	public void setCount(int count)
	{
		this.mCount = count;
	}
	
	public void setData(ArrayList<ThumbnailBean> data){
		this.mDatas = data;
	}
	
	public ArrayList<ThumbnailBean> getData(){
		return mDatas;
	}
	
	public boolean isDataInit(){
		return !(mDatas == null);
	}
	
	public boolean isChecked(){
		return mFirstThumbnailBean.isChecked();
	}
	
	public void setChecked(boolean flag){
		mFirstThumbnailBean.setChecked(flag);
	}

	public String getBucketId() {
		return mBucketId;
	}

	public void setBucketId(String bucketId) {
		mBucketId = bucketId;
	}

	public boolean isNeedRefresh() {
		return mNeedRefresh;
	}

	public void setNeedRefresh(boolean needRefresh) {
		mNeedRefresh = needRefresh;
	}
}
